/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CRM;

/**
 *
 * @author Burhan
 */
import java.util.Date;
import java.util.ArrayList;
import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.users.User;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Contact
{
    /**
     * Contains unique id for contact
     */
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    /**
     * Contains first name of contact
     */
    @Persistent
    private String firstName;

    /**
     * Contains last name of contact
     */
    @Persistent
    private String lastName;

    /**
     * Contains the company that contact work for
     */
    @Persistent
    private Company company;

    /**
     * Contains e-mail address of contact
     */
    @Persistent
    private String email;

    /**
     * Contains office phone number of contact
     */
    @Persistent
    private String officePhone;

    /**
     * Contains mobile phone number of contact
     */
    @Persistent
    private String mobilePhone;

    /**
     * Contains other phone number of contact
     */
    @Persistent
    private String otherPhone;

    /**
     * Contains fax number of contact
     */
    @Persistent
    private String fax;

    /**
     * Contains birthdate of contact
     */
    @Persistent
    private Date birthDate;

    /**
     * Contains address of contact
     */
    @Persistent
    private String address;

    /**
     * Contains department of contact
     */
    @Persistent
    private String department;

    /**
     * Contains all of the notes about the contact
     */
    @Persistent
    private ArrayList<Note> notes;

    /**
     * Contains all of the tasks about the contact
     */
    @Persistent
    private ArrayList<Task> tasks;

    /**
     * Returns uniqe key
     *
     * @return Key
     */
    public Key getKey()
    {
        return key;
    }

    
    /**
     * Return the adres
     *
     * @return String
     */
    public String getAddress()
    {
        return address;
    }

    /**
     *
     * @param String address
     */
    public void setAddress(String address)
    {
        this.address = address;
    }

    public Date getBirthDate()
    {
        return birthDate;
    }

    public void setBirthDate(Date birthDate)
    {
        this.birthDate = birthDate;
    }

    public Company getCompany()
    {
        return company;
    }

    public void setCompany(Company company)
    {
        this.company = company;
    }

    public String getDepartment()
    {
        return department;
    }

    public void setDepartment(String department)
    {
        this.department = department;
    }

    public String getEmail()
    {
        return email;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getFax()
    {
        return fax;
    }

    public void setFax(String fax)
    {
        this.fax = fax;
    }

    public String getFirstName()
    {
        return firstName;
    }

    public void setFirstName(String firstName)
    {
        this.firstName = firstName;
    }

    public String getLastName()
    {
        return lastName;
    }

    public void setLastName(String lastName)
    {
        this.lastName = lastName;
    }

    public String getMobilePhone()
    {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone)
    {
        this.mobilePhone = mobilePhone;
    }

    public ArrayList<Note> getNotes()
    {
        return notes;
    }

    public void setNotes(ArrayList<Note> notes)
    {
        this.notes = notes;
    }

    public String getOfficePhone()
    {
        return officePhone;
    }

    public void setOfficePhone(String officePhone)
    {
        this.officePhone = officePhone;
    }

    public String getOtherPhone()
    {
        return otherPhone;
    }

    public void setOtherPhone(String otherPhone)
    {
        this.otherPhone = otherPhone;
    }

    public ArrayList<Task> getTasks()
    {
        return tasks;
    }

    public void setTasks(ArrayList<Task> tasks)
    {
        this.tasks = tasks;
    }

    public Contact(String firstName, String lastName, Company company, String email, String officePhone, String mobilePhone, String otherPhone, String fax, Date birthDate, String address, String department, ArrayList<Note> notes, ArrayList<Task> tasks)
    {

        setFirstName(firstName);
        setLastName(lastName);
        setCompany(company);
        setEmail(email);
        setOfficePhone(officePhone);
        setMobilePhone(mobilePhone);
        setOtherPhone(otherPhone);
        setFax(fax);
        setBirthDate(birthDate);
        setAddress(address);
        setDepartment(department);
        setNotes(notes);
        setTasks(tasks);
    }
}

